Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

adding Uniswap v3 to OP Sepolia #463

Closed
wants to merge 2 commits into from
Closed

adding Uniswap v3 to OP Sepolia #463

wants to merge 2 commits into from

Conversation

sbvegan
Copy link

@sbvegan sbvegan commented Dec 21, 2023

  • What kind of change does this PR introduce? (Bug fix, feature, docs update, ...)

I'm following the adding a new chain guide in the readme to deploy Uniswap v3 on OP Sepolia.

  • What is the current behavior? (You can also link to an open issue here)

No OP Sepolia support :(

  • What is the new behavior (if this is a feature change)?

OP Sepolia support :)

  • Other information:

I'm tracking my overall progress here: ethereum-optimism/developers#148

@sbvegan sbvegan requested a review from a team as a code owner December 21, 2023 21:54
@sbvegan sbvegan marked this pull request as draft December 21, 2023 21:54
@sbvegan
Copy link
Author

sbvegan commented Dec 21, 2023

todo:

  • Deploy contracts on chain (deploy the v3 protocol contracts ethereum-optimism/developers#149)
  • add the pools to subgraph
  • Populate v3 providers in src/providers/v3/subgraph-provider and src/providers/v3/static-subgraph-provider
  • Populate chainId and addresses in src/util/chains.ts and src/util/addresses.ts
  • Populate token providers in src/providers/caching-token-provider and src/providers/token-provider.ts
  • Populate gas constants in src/routers/alpha-router/gas-models/*
  • Populate bases in src/routers/legacy-router/bases.ts
  • Populate test/integ/routers/alpha-router/alpha-router.integration.test.ts and src/providers/v2/static-subgraph-provider.ts
  • Populate src/routers/alpha-router/*
  • Add a log to /CHANGELOG.md
  • Run npm run integ-test successfully

@sbvegan
Copy link
Author

sbvegan commented Dec 21, 2023

Test is failing with the following output:

soyboy@soyboys-Air smart-order-router % npm run integ-test

> @uniswap/[email protected] integ-test
> TS_NODE=true jest test/integ

 FAIL  test/integ/routers/alpha-router/alpha-router.integration.test.ts
  ● Test suite failed to run

    test/integ/routers/alpha-router/alpha-router.integration.test.ts:86:34 - error TS2307: Cannot find module '../../../../src/types/other/factories/Permit2__factory' or its corresponding type declarations.

    86 import { Permit2__factory } from '../../../../src/types/other/factories/Permit2__factory';
                                        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    test/integ/routers/alpha-router/alpha-router.integration.test.ts:3056:14 - error TS2339: Property 'OPTIMISM_SEPOLIA' does not exist on type 'typeof ChainId'.

    3056     [ChainId.OPTIMISM_SEPOLIA]: () => USDC_ON(ChainId.OPTIMISM_SEPOLIA),
                      ~~~~~~~~~~~~~~~~
    test/integ/routers/alpha-router/alpha-router.integration.test.ts:3056:55 - error TS2339: Property 'OPTIMISM_SEPOLIA' does not exist on type 'typeof ChainId'.

    3056     [ChainId.OPTIMISM_SEPOLIA]: () => USDC_ON(ChainId.OPTIMISM_SEPOLIA),
                                                               ~~~~~~~~~~~~~~~~
    test/integ/routers/alpha-router/alpha-router.integration.test.ts:3076:14 - error TS2339: Property 'OPTIMISM_SEPOLIA' does not exist on type 'typeof ChainId'.

    3076     [ChainId.OPTIMISM_SEPOLIA]: () => DAI_ON(ChainId.OPTIMISM_SEPOLIA),
                      ~~~~~~~~~~~~~~~~
    test/integ/routers/alpha-router/alpha-router.integration.test.ts:3076:54 - error TS2339: Property 'OPTIMISM_SEPOLIA' does not exist on type 'typeof ChainId'.

    3076     [ChainId.OPTIMISM_SEPOLIA]: () => DAI_ON(ChainId.OPTIMISM_SEPOLIA),
                                                              ~~~~~~~~~~~~~~~~
    test/integ/routers/alpha-router/alpha-router.integration.test.ts:3096:20 - error TS2339: Property 'OPTIMISM_SEPOLIA' does not exist on type 'typeof ChainId'.

    3096       c != ChainId.OPTIMISM_SEPOLIA &&
                            ~~~~~~~~~~~~~~~~

Test Suites: 1 failed, 1 total
Tests:       0 total
Snapshots:   0 total
Time:        1.687 s
Ran all test suites matching /test\/integ/i.

Looks like I need to update the ChainId for OP Sepolia, in the uniswap core SDK

@jsy1218
Copy link
Member

jsy1218 commented Jan 1, 2024

In order for all the tests to run successfully from your forked repo, you will need to create new repository secrets, for the following secrets used in https://github.com/Uniswap/smart-order-router/blob/main/.github/workflows/tests.yml:

  •       JSON_RPC_PROVIDER: ${{ secrets.JSON_RPC_PROVIDER }}
    
  •       JSON_RPC_PROVIDER_GORLI: ${{ secrets.JSON_RPC_PROVIDER_GORLI }}
    
  •       JSON_RPC_PROVIDER_OPTIMISM: ${{ secrets.JSON_RPC_PROVIDER_OPTIMISM }}
    
  •       JSON_RPC_PROVIDER_OPTIMISM_GOERLI: ${{ secrets.JSON_RPC_PROVIDER_OPTIMISM_GOERLI }}
    
  •       JSON_RPC_PROVIDER_ARBITRUM_ONE: ${{ secrets.JSON_RPC_PROVIDER_ARBITRUM_ONE }}
    
  •       JSON_RPC_PROVIDER_ARBITRUM_GOERLI: ${{ secrets.JSON_RPC_PROVIDER_ARBITRUM_GOERLI }}
    
  •       JSON_RPC_PROVIDER_POLYGON: ${{ secrets.JSON_RPC_PROVIDER_POLYGON }}
    
  •       JSON_RPC_PROVIDER_POLYGON_MUMBAI: ${{ secrets.JSON_RPC_PROVIDER_POLYGON_MUMBAI }}
    
  •       JSON_RPC_PROVIDER_CELO: ${{ secrets.JSON_RPC_PROVIDER_CELO }}
    
  •       JSON_RPC_PROVIDER_CELO_ALFAJORES: ${{ secrets.JSON_RPC_PROVIDER_CELO_ALFAJORES }}
    
  •       JSON_RPC_PROVIDER_BNB: ${{ secrets.JSON_RPC_PROVIDER_BNB }}
    
  •       JSON_RPC_PROVIDER_AVALANCHE: ${{ secrets.JSON_RPC_PROVIDER_AVALANCHE }}
    
  •       JSON_RPC_PROVIDER_BASE: ${{ secrets.JSON_RPC_PROVIDER_BASE }}
    
  •       TENDERLY_BASE_URL: ${{ secrets.TENDERLY_BASE_URL }}
    
  •       TENDERLY_USER: ${{ secrets.TENDERLY_USER }}
    
  •       TENDERLY_PROJECT: ${{ secrets.TENDERLY_PROJECT }}
    
  •       TENDERLY_ACCESS_KEY: ${{ secrets.TENDERLY_ACCESS_KEY }}
    

If you need any help in provisioning those RPC URLs/API Keys, lmk. Happy to help :)

@sbvegan
Copy link
Author

sbvegan commented Jan 5, 2024

Thank you! I'll reach out if I run into issues when I get back to this

@cgkol
Copy link
Contributor

cgkol commented Feb 2, 2024

Closing until this is ready again:) let us know if more help is needed with setting this up and you can reopen the PR and we'll respond!

@cgkol cgkol closed this Feb 2, 2024
@jsy1218 jsy1218 mentioned this pull request Feb 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants